import { ApiProperty } from '@nestjs/swagger'
import { IsString, MaxLength } from 'class-validator'

export class createArticleDto {
  @ApiProperty()
  @IsString()
  @MaxLength(50, { message: '输入的标题长度不能超过50个字符' })
  title: string
  @ApiProperty()
  @IsString()
  body: string
}
